package model;

import java.util.ArrayList;

public class MainWindowModel 
{
	private ArrayList<Button> userButtons;

	public MainWindowModel() 
	{
		super();
		this.userButtons = UserPermissions.getInstance(0,null,null).getUserButtons();
	}

	public ArrayList<Button> getUserButtons() 
	{
		return userButtons;
	}
	
	public int getButtonIdByName(String buttonName)
	{
		for(int i = 0 ; i < userButtons.size() ; i++)
		{
			if(userButtons.get(i).getButtonName().equals(buttonName))
				return userButtons.get(i).getButtonID();
		}
		
		return -1;
	}
	
}
